load("@fbcode//registry:defs.bzl", "rpm")
load("@fbcode_macros//build_defs:python_binary.bzl", "python_binary")

oncall("sapling")

python_binary(
    # @autodeps-skip
    name = "hgcache_size_logger",
    main_src = "hgcache_size_logger.py",
    deps = [
        "//libfb/py:log",
        "//rfe/scubadata:scubadata_py3",
    ],
)

rpm.builder(
    name = "fb-hgcache_size_logger",
    configurations = [
        rpm.configuration(
            arch = "x86_64",
        ),
        rpm.configuration(
            arch = "aarch64",
        ),
    ],
    features = [
        rpm.install(
            src = "fbcode//eden/scm/hgcache_size_logger:hgcache_size_logger",
            dst = "/usr/local/bin/hgcache_size_logger",
        ),
    ],
    oncall = "source_control",
    summary = "A tool to track size of hgcache",
)
